package com.datasure.demo.webSocket.services;

import com.datasure.demo.webSocket.config.RequestInfo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xiaolong5.zhang
 * @date 2022/05/24 18:19
 **/
public class WkDeviceService extends BasicService<WkDeviceService.DeviceDTO>{

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    class DeviceDTO{
        private Long deviceId;
        private String deviceUuid;
        private String deviceName;
    }

    @Override
    protected String bussineType() {
        return "device";
    }

    @Override
    protected Boolean isSchedule() {
        return Boolean.FALSE;
    }

    @Override
    public DeviceDTO getMessage(Long userId, RequestInfo requestInfo) {

        //业务逻辑
        return DeviceDTO.builder()
                .deviceId(10000L)
                .deviceName("设备1")
                .deviceUuid("112lkjlsjdkf")
                .build();
    }
}
